var dateString='   2019/11/11 00:00:00    ';

console.log(dateString.length);

console.log(dateString.trim());

console.log(dateString.replace(/\//g, "-"));

console.log(dateString.substring(0,10));



